﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.CompilerServices;
using lucere.index.merge;

namespace lucere.index.delete
{
    /// <summary>Holds buffered deletes, by docID, term or query.  We
    /// hold two instances of this class: one for the deletes
    /// prior to the last flush, the other for deletes after
    /// the last flush.  This is so if we need to abort
    /// (discard all buffered docs) we can also discard the
    /// buffered deletes yet keep the deletes done during
    /// previously flushed segments. 
    /// </summary>

    public interface IBufferedDeletes
    {
        int Size();
        void Update(IBufferedDeletes bufferedDeletes);
        void Clear();
        void AddBytesUsed(long bytesUsed);
        bool Any();
        void Remap(IMergeDocIDRemapper mapper, ISegmentInfos infos, int[][] docMaps, int[] delCounts, IOneMerge merge, int mergeDocCount);
    }
}
